{include file="include/top"}
<style>
    td,.layui-table th{
        text-align: center;!important;
    }
</style>
<script>
    $(document).ready(function() {
        $("[fid='5']").hide();
        $(".x-show").click(function(){
            if($("[fid='5']").show()){
                $("[fid='5']").hide();
            }
            if($("[fid='5']").hide()){
                $("[fid='5']").show();
            }
        });
    })
</script>
<body>
<div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">商品管理</a>
            <a>
              <cite>刮刮卡列表</cite></a>
          </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">
                    <button class="layui-btn layui-btn-radius layui-btn-normal" onclick="edit()"><i class="layui-icon">&#xe654;</i>添加商品</button>
                </div>
                <div class="layui-card-body ">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                            <th width="70">ID</th>
                            <th>等级</th>
                            <th>奖品</th>
                            <th>是否显示</th>
                            <th>操作</th>
                        </thead>
                        <tbody class="x-cate">
                        {volist name="list" id="data"}
                            <tr>
                                <td>{$key+1}</td>
                                <td>
                                    <button type="button" class="layui-btn layui-btn-radius layui-btn-primary">{$data.jb_name}</button>
                                </td>
                                <td>{$data.jc_value}</td>
                                <td>
                                    {if $data.jc_sore == 1}
                                    <input type="checkbox" name="switch"  lay-text="开启|停用"  checked="" lay-skin="switch">
                                    {else}
                                    <input type="checkbox" name="switch"  lay-text="开启|停用" lay-skin="switch">
                                    {/if}
                                </td>
                                <td class="td-manage">
                                    <button class="layui-btn layui-btn-warm layui-btn-xs"  onclick="x_admin_show('编辑','admin-edit.html')" ><i class="layui-icon">&#xe642;</i>编辑</button>
                                    <button class="layui-btn-danger layui-btn layui-btn-xs"  onclick="member_del(this,'要删除的id')" href="javascript:;" ><i class="layui-icon">&#xe640;</i>删除</button>
                                </td>
                            </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                <div class="layui-card-body ">
                    <div class="page">
                        {$page}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    layui.use(['laydate','form'], function(){
        var laydate = layui.laydate;
        var form = layui.form;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });
</script>
</html>